home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 May / PersonalComputerWorld-May2008-CoverdiscCD.iso / Software / Resources / Security / PC Tools AntiVirus 4.0.0.20 / avinstall.exe / {tmp} / shutdown.vbs < prev    next >
Encoding:
Text File  |  2008-01-09  |  313 b   |  14 lines

  1. Sub ShutDown
  2.  nLogOff=0
  3.  nReboot=2
  4.  nForceLogOff=4
  5.  nForceReboot=6
  6.  nPowerDown=8
  7.  nForcePowerDown=12
  8.  Set oOS = GetObject("winmgmts:{(Shutdown)}").ExecQuery("Select * from Win32_OperatingSystem")
  9.  For Each oOperatingSystem in oOS
  10.   oOperatingSystem.Win32Shutdown(nForceReboot)
  11.  Next
  12. End sub
  13. ShutDown
  14.